home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / fseek.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. FSEEK(3)            MINTLIB LIBRARY FUNCTIONS            FSEEK(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        fseek, ftell, rewind - reposition a stream
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <stdio.h>
  12.  
  13.        fseek(FILE *stream, long offset, int mode);
  14.  
  15.        long ftell(FILE *stream);
  16.  
  17.        void rewind(FILE *stream);
  18.  
  19. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  20.        fseek sets the position of the next input or output opera-
  21.        tion on the stream. The parameter  offset  determines  the
  22.        new position according to the parameter mode:
  23.          SEEK_SET (0): offset bytes from the start of the file
  24.          SEEK_CUR (1): offset bytes further than the current
  25.                        position
  26.          SEEK_END (2): offset bytes from the end of the file
  27.  
  28.        rewind  is equivalent to fseek(stream, 0L, 0), except that
  29.        no value is returned.
  30.  
  31.        ftell returns the offset of the current byte  relative  to
  32.        the  beginning  of  the  file  associated  with  the named
  33.        stream.
  34.  
  35.        fseek and rewind undo any effects of ungetc.
  36.  
  37.        After fseek or rewind, the next operation on a file opened
  38.        for update may be either input or output.
  39.  
  40. R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
  41.        fseek returns 0 on success, -1 on failure.
  42.  
  43.        ftell returns a position >= 0 on success, -1 on failure.
  44.  
  45. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  46.        l✓ls✓se✓ee✓ek✓k(✓(3✓3)✓),✓, f✓fo✓op✓pe✓en✓n(✓(3✓3)✓),✓, p✓po✓op✓pe✓en✓n(✓(3✓3)✓),✓, u✓un✓ng✓ge✓et✓tc✓c(✓(3✓3)✓)
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.